import {LOADALLLIST,LOADTHEME,LOADBOX,LOADCLOTHES,LOADSERIES,LOADSHOES} from './actionTypes'
import { Map,List } from 'immutable'


const defaultState=Map({
    alllist:List([]),
    theme:List([]),
    series:List([]),
    shoes:List([]),
    clothes:List([])
})

export default(state=defaultState,action)=>{
    switch (action.type){
        case LOADALLLIST:
            // console.log(100);
            return state.updateIn(['alllist'],()=>action.alllist)
        case LOADTHEME:
            return state.updateIn(['theme'],()=>action.theme)
        case LOADSERIES:
            return state.updateIn(['series'],()=>action.series)
        case LOADSHOES:
            return state.updateIn(['shoes'],()=>action.shoes)
        case LOADCLOTHES:
            return state.updateIn(['clothes'],()=>action.clothes)
        default:
            return state
        }
}